from arrangement import Arrangement
from point import Point
from input_reader import ConfigurationReader

def print_sol(sol):
    print len(sol)
    print " ".join([str(p.x) + " " + str(p.y) for p in sol])

def executeFile(file_path):
    cr = ConfigurationReader(file_path)
    problem = cr.read_problem()
    sol = problem.get_solution()
    print_sol(sol)

def test1():
    executeFile("test1.txt")
def test2():
    executeFile("test2.txt")
def test3():
    executeFile("test3.txt")

def main():
    import sys
    if (len(sys.argv) < 2):
        print "Wrong number of arguments!\n" + \
              "Arguments: file_path"
        return
    for i in xrange(len(sys.argv) - 1):
        executeFile(sys.argv[i + 1])

if __name__ == "__main__":
    main()
    #import os; os.system('pause')
